import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
 
const store = new Vuex.Store({
	state: {
		requestLoading: false, //加载等待是否显示
		start:false,
		showRoom: false,
		matchUser:{},
		beforStart:false
	},
	mutations: {
		//显示请求加载动画
		request_show_loading(state) {
			state.requestLoading = true;
		},
		//隐藏请求加载动画
		request_hide_loading(state) {
			state.requestLoading = false;
		},
		startTime(state){
			state.start = !state.start
		},
		show_Room(state,value){
			state.showRoom = value
		},
		set_matchUser(state,user){
			state.matchUser = user
		},
		befor_start(state,value){
			state.beforStart = value
		}
	}
})
 
export default store
